/**
 * Copyright (c) 2010 InnovaSWC.COM
 */
package com.innovaswc.scrum.persistencia;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Set;


/**
 * The persistent class for the backlogitem database table.
 * 
 */
@Entity
@Table(name="backlogitem")
public class BacklogItem implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String definicion;

	private Timestamp fechareg;

	private String resumen;

	//bi-directional many-to-one association to Producto
    @ManyToOne
	@JoinColumn(name="codigo_producto")
	private Producto producto;

	//bi-directional many-to-one association to BacklogItemKind
    @ManyToOne
	@JoinColumn(name="tipo_id")
	private BacklogItemKind backlogitemKind;

	//bi-directional many-to-one association to BacklogItem
    @ManyToOne
	@JoinColumn(name="backlogitem_padre")
	private BacklogItem backlogitem;

	//bi-directional many-to-one association to BacklogItem
	@OneToMany(mappedBy="backlogitem")
	private Set<BacklogItem> backlogitems;

	//bi-directional many-to-many association to ReleaseProducto
	@ManyToMany(mappedBy="backlogitems")
	private Set<ReleaseProducto> releaseProductos;

    public BacklogItem() {
    }

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDefinicion() {
		return this.definicion;
	}

	public void setDefinicion(String definicion) {
		this.definicion = definicion;
	}

	public Timestamp getFechareg() {
		return this.fechareg;
	}

	public void setFechareg(Timestamp fechareg) {
		this.fechareg = fechareg;
	}

	public String getResumen() {
		return this.resumen;
	}

	public void setResumen(String resumen) {
		this.resumen = resumen;
	}

	public Producto getProducto() {
		return this.producto;
	}

	public void setProducto(Producto producto) {
		this.producto = producto;
	}
	
	public BacklogItemKind getBacklogitemKind() {
		return this.backlogitemKind;
	}

	public void setBacklogitemKind(BacklogItemKind backlogitemKind) {
		this.backlogitemKind = backlogitemKind;
	}
	
	public BacklogItem getBacklogitem() {
		return this.backlogitem;
	}

	public void setBacklogitem(BacklogItem backlogitem) {
		this.backlogitem = backlogitem;
	}
	
	public Set<BacklogItem> getBacklogitems() {
		return this.backlogitems;
	}

	public void setBacklogitems(Set<BacklogItem> backlogitems) {
		this.backlogitems = backlogitems;
	}
	
	public Set<ReleaseProducto> getReleaseProductos() {
		return this.releaseProductos;
	}

	public void setReleaseProductos(Set<ReleaseProducto> releaseProductos) {
		this.releaseProductos = releaseProductos;
	}
	
}